import request from '@/utils/request'
export const getCategory = () => request({
  method: 'get',
  url: '/admin/product/getCategory1'
})
// 获取二级下拉菜单
export const getCategory2Id = (category1Id) => request({
  method: 'get',
  url: `/admin/product/getCategory2/${category1Id}`
})
// 获取三级下拉菜单
export const getCategory3Id = (category2Id) => request({
  method: 'get',
  url: `/admin/product/getCategory3/${category2Id}`
})
// 获取商品属性
export const getshopList = (category1Id, category2Id, category3Id) => request({
  method: 'get',
  url: `/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`
})
// 添加商品属性值
export const addsShopAttr = (data) => request({
  url: '/admin/product/saveAttrInfo',
  method: 'post',
  data
})
// 删除商品的属性
export const deleteAttr = (attrId) => request({
  method: 'delete',
  url: `/admin/product/deleteAttr/${attrId}`
})
